<template>
  <router-view v-loading="loading" v-if="loading2"></router-view>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "school",
  data() {
    return {
      loading: false,
      loading2: false
    };
  },
  computed: mapGetters("school", ["getstart"]),
  async mounted() {
    if (!this.getstart) {
      this.loading = true;
      await this.$store.dispatch("school/actionschool");
      await this.$store.dispatch("school/actionschoolpackegekey");
      this.$store.dispatch("school/actionstart");
      this.loading = false;
    }
    this.loading2 = true;
  }
};
</script>
